package com.atguigu.yygh.user.controller.api;

import com.atguigu.yygh.model.user.Patient;
import com.atguigu.yygh.user.service.PatientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/3/26 2:56
 */
@Api(tags = "内部调用-患者接口")
@RequestMapping("/api/userinfo/patient")
@RestController
public class ApiPatientController {
    @Autowired
    private PatientService patientService;
    @ApiOperation(value = "内部调用-根据患者id获取患者信息")
    @GetMapping("/getPatientInfo/{patientId}")
    public Patient getPatientInfo(@PathVariable("patientId") Long patientId) {
        return patientService.getById(patientId);
    }
}
